package cn.server.impl;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.jfinal.core.JFinal;

public class JFinalServer extends BaseServer {
	/**
	 * Logger for this class
	 */
	private static final Log logger = LogFactory.getLog(JFinalServer.class);

	@Override
	public void startServer() {
		int port = param.getPort();
		try {
			String[] params = new String[4];
			params[0] = "webapp";// web的应用目录
			params[1] = String.valueOf(port);// 端口
			params[2] = "/";// context目录
			params[3] = "5";// 扫描周期
			JFinal.main(params);
			System.out.println(111);
		} catch (Throwable e) {
			logger.error("error start server!", e);
			throw new RuntimeException("error start server!", e);
		} finally {
		}
	}
}
